home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / ezacce / register.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-03-03  |  10.5 KB  |  312 lines

  1. VERSION 2.00
  2. Begin Form register 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Little League Registration"
  6.    ClientHeight    =   3855
  7.    ClientLeft      =   480
  8.    ClientTop       =   1455
  9.    ClientWidth     =   8685
  10.    Height          =   4260
  11.    Left            =   420
  12.    LinkTopic       =   "dixie"
  13.    ScaleHeight     =   3855
  14.    ScaleWidth      =   8685
  15.    Top             =   1110
  16.    Width           =   8805
  17.    Begin CommandButton cmdinstructions 
  18.       Caption         =   "&Instructions"
  19.       Height          =   495
  20.       Left            =   960
  21.       TabIndex        =   11
  22.       TabStop         =   0   'False
  23.       Top             =   2220
  24.       Width           =   1575
  25.    End
  26.    Begin CommandButton cmdexit 
  27.       Caption         =   "E&XIT"
  28.       Height          =   495
  29.       Left            =   960
  30.       TabIndex        =   10
  31.       TabStop         =   0   'False
  32.       Top             =   3000
  33.       Width           =   1575
  34.    End
  35.    Begin Ctl3D Ctl3D1 
  36.       ClassList       =   REGISTER.FRX:0000
  37.       Left            =   120
  38.       Top             =   6180
  39.    End
  40.    Begin ListBox List1 
  41.       FontBold        =   -1  'True
  42.       FontItalic      =   0   'False
  43.       FontName        =   "Courier New"
  44.       FontSize        =   8.25
  45.       FontStrikethru  =   0   'False
  46.       FontUnderline   =   0   'False
  47.       ForeColor       =   &H00000000&
  48.       Height          =   3180
  49.       Left            =   3660
  50.       TabIndex        =   4
  51.       TabStop         =   0   'False
  52.       Top             =   480
  53.       Width           =   4815
  54.    End
  55.    Begin TextBox txtlname 
  56.       ForeColor       =   &H00000000&
  57.       Height          =   285
  58.       Left            =   1560
  59.       MaxLength       =   15
  60.       TabIndex        =   0
  61.       Top             =   180
  62.       Width           =   1935
  63.    End
  64.    Begin TextBox txtinitial 
  65.       Height          =   285
  66.       Left            =   1560
  67.       MaxLength       =   1
  68.       TabIndex        =   2
  69.       Top             =   1020
  70.       Width           =   255
  71.    End
  72.    Begin TextBox txtfname 
  73.       Height          =   285
  74.       Left            =   1560
  75.       MaxLength       =   15
  76.       TabIndex        =   1
  77.       Top             =   600
  78.       Width           =   1935
  79.    End
  80.    Begin Label lblbirthdate 
  81.       Alignment       =   2  'Center
  82.       BackColor       =   &H8000000F&
  83.       BorderStyle     =   1  'Fixed Single
  84.       Height          =   225
  85.       Left            =   1500
  86.       TabIndex        =   8
  87.       Top             =   1440
  88.       Width           =   1395
  89.    End
  90.    Begin Label lable4 
  91.       BackColor       =   &H8000000F&
  92.       BorderStyle     =   1  'Fixed Single
  93.       Caption         =   "First Name      Last Name      MI Player no."
  94.       FontBold        =   -1  'True
  95.       FontItalic      =   0   'False
  96.       FontName        =   "Courier New"
  97.       FontSize        =   8.25
  98.       FontStrikethru  =   0   'False
  99.       FontUnderline   =   0   'False
  100.       Height          =   255
  101.       Left            =   3660
  102.       TabIndex        =   9
  103.       Top             =   180
  104.       Width           =   4815
  105.    End
  106.    Begin Label Label1 
  107.       Alignment       =   2  'Center
  108.       AutoSize        =   -1  'True
  109.       BackColor       =   &H8000000F&
  110.       BorderStyle     =   1  'Fixed Single
  111.       Caption         =   "Initial"
  112.       Height          =   225
  113.       Left            =   180
  114.       TabIndex        =   7
  115.       Top             =   1020
  116.       Width           =   1155
  117.    End
  118.    Begin Label Label3 
  119.       Alignment       =   2  'Center
  120.       AutoSize        =   -1  'True
  121.       BackColor       =   &H8000000F&
  122.       BorderStyle     =   1  'Fixed Single
  123.       Caption         =   "Birthdate"
  124.       Height          =   225
  125.       Left            =   180
  126.       TabIndex        =   6
  127.       Top             =   1440
  128.       Width           =   1155
  129.    End
  130.    Begin Label Label2 
  131.       Alignment       =   2  'Center
  132.       AutoSize        =   -1  'True
  133.       BackColor       =   &H8000000F&
  134.       BorderStyle     =   1  'Fixed Single
  135.       Caption         =   "First name"
  136.       Height          =   225
  137.       Left            =   180
  138.       TabIndex        =   5
  139.       Top             =   600
  140.       Width           =   1155
  141.    End
  142.    Begin Label lblname 
  143.       Alignment       =   2  'Center
  144.       AutoSize        =   -1  'True
  145.       BackColor       =   &H8000000F&
  146.       BorderStyle     =   1  'Fixed Single
  147.       Caption         =   "Last name"
  148.       Height          =   225
  149.       Left            =   180
  150.       TabIndex        =   3
  151.       Top             =   180
  152.       Width           =   1155
  153.    End
  154. Option Explicit
  155. Sub cmdexit_Click ()
  156.     End
  157. End Sub
  158. Sub cmdinstructions_click ()
  159. 'Gives a short explanation of how to use this sample.
  160.     Dim msg, newline, tick
  161.     newline = Chr$(13) + Chr$(10)
  162.     tick = Chr$(34)
  163.     msg = msg + "This is one form of a Little League Baseball" + newline
  164.     msg = msg + "registration program written using EZAccess." + newline
  165.     msg = msg + newline
  166.     msg = msg + "Note: Before using this example you should " + newline
  167.     msg = msg + "run EZAccess on the table " + tick + "Players" + tick + " and" + newline
  168.     msg = msg + "choose " + tick + "Print" + tick + " to get a Relations Listing." + newline
  169.     msg = msg + newline
  170.     msg = msg + "Instructions:" + newline
  171.     msg = msg + newline
  172.     msg = msg + "1. Key all or part of a players last name and " + newline
  173.     msg = msg + "look at the source code required to load the " + newline
  174.     msg = msg + "list box. " + newline
  175.     msg = msg + newline
  176.     msg = msg + "2. Click on a player in the list box and look " + newline
  177.     msg = msg + "at the source code required to display their " + newline
  178.     msg = msg + "birthdate." + newline
  179.     MsgBox msg, 64, "Instructions"
  180. End Sub
  181. Sub Form_Load ()
  182. 'Center the form
  183.     register.Left = (screen.Width / 2) - (register.Width / 2)
  184.     register.Top = (screen.Height / 2) - (register.Height / 2)
  185. 'Get instructions
  186.     cmdinstructions_click
  187. End Sub
  188. Sub List1_Click ()
  189.     SeqNum = Right$(list1.Text, 4)
  190.     RK_SeqNum
  191.     lblbirthdate.Caption = birthdate
  192.     txtlname.Text = Trim$(LName)
  193.     txtfname.Text = Trim$(FName)
  194.     txtinitial.Text = Initial
  195.     txtlname.SetFocus
  196. End Sub
  197. Sub txtfname_GotFocus ()
  198. 'Select everything in the "First Name" text box
  199.     txtfname.SelStart = 0
  200.     txtfname.SelLength = Len(txtfname.Text)
  201. End Sub
  202. Sub txtfname_KeyPress (keyascii As Integer)
  203. 'Upper case everything that is typed into the text box.
  204.     keyascii = Asc(UCase$(Chr$(keyascii)))
  205. 'Blank the text box "Initial."
  206.     txtinitial.Text = ""
  207. 'Blank the text box "Birthdate."
  208.     lblbirthdate.Caption = ""
  209. 'If ENTER is pressed move to the "Initial" text box.
  210.     If keyascii = 13 Then
  211.         keyascii = 0
  212.         txtinitial.SetFocus
  213.     End If
  214. End Sub
  215. Sub txtfname_KeyUp (KeyCode As Integer, Shift As Integer)
  216. 'Clear the List Box
  217.     list1.Clear
  218. 'Note: Try commenting the If and End If statements out
  219. 'and see what happens.
  220.     If txtlname.Text <> "" Then
  221.         Do
  222. 'LName, FName, and Initial refer to fields in "Players."
  223.             LName = txtlname.Text  'Set the first key
  224.             FName = txtfname.Text  'Set the second key
  225.             Initial = ""           'Set the third key
  226. ' "Read Equal" for matches to the text in "Last Name" and
  227. ' "First Name."
  228.             RE_LName
  229. 'Check to see if matching records have been exhausted.
  230.             If eof_players Then Exit Do
  231. 'A matching record was found so add it to the List Box.
  232.             list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
  233.         Loop
  234.     End If
  235. End Sub
  236. Sub txtinitial_GotFocus ()
  237. 'Select everything in the "Initial" text box
  238.     txtinitial.SelStart = 0
  239.     txtinitial.SelLength = Len(txtinitial.Text)
  240. End Sub
  241. Sub txtinitial_KeyPress (keyascii As Integer)
  242. 'Upper case everything that is typed into the text box.
  243.     keyascii = Asc(UCase$(Chr$(keyascii)))
  244. 'Blank the text box "Birthdate."
  245.     lblbirthdate.Caption = ""
  246. 'If ENTER is pressed just turn off that annoying beep!
  247.     If keyascii = 13 Then
  248.         keyascii = 0
  249.     End If
  250. End Sub
  251. Sub txtinitial_KeyUp (KeyCode As Integer, Shift As Integer)
  252. 'Clear the List Box
  253.     list1.Clear
  254. 'Note: Try commenting the If and End If statements out
  255. 'and see what happens.
  256.     If txtlname.Text <> "" Then
  257.         Do
  258. 'LName, FName, and Initial refer to fields in "Players."
  259.             LName = txtlname.Text     'Set the first key
  260.             FName = txtfname.Text     'Set the second key
  261.             Initial = txtinitial.Text 'Set the third key
  262. ' "Read Equal" for matches to the text in "Last Name",
  263. ' "First Name" and "Initial."
  264.             RE_LName
  265. 'Check to see if matching records have been exhausted.
  266.             If eof_players Then Exit Do
  267. 'A matching record was found so add it to the List Box.
  268.             list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
  269.         Loop
  270.     End If
  271. End Sub
  272. Sub txtlname_GotFocus ()
  273. 'Select everything in the "Last Name" text box
  274.     txtlname.SelStart = 0
  275.     txtlname.SelLength = Len(txtlname.Text)
  276. End Sub
  277. Sub txtlname_KeyPress (keyascii As Integer)
  278. 'Upper case everything that is typed into the text box.
  279.     keyascii = Asc(UCase$(Chr$(keyascii)))
  280. 'Blank the text box "First Name."
  281.     txtfname.Text = ""
  282. 'Blank the text box "Initial."
  283.     txtinitial.Text = ""
  284. 'Blank the text box "Birthdate."
  285.     lblbirthdate.Caption = ""
  286. 'If ENTER is pressed move to the "First Name" text box.
  287.     If keyascii = 13 Then
  288.         keyascii = 0
  289.         txtfname.SetFocus
  290.     End If
  291. End Sub
  292. Sub txtlname_KeyUp (KeyCode As Integer, Shift As Integer)
  293. 'Clear the List Box
  294.     list1.Clear
  295. 'Note: Try commenting the If and End If statements out
  296. 'and see what happens.
  297.     If Trim$(txtlname.Text) <> "" Then
  298. 'LName, FName, and Initial refer to fields in "Players."
  299.         LName = txtlname.Text  'Set the first key.
  300.         FName = ""             'Set the second key.
  301.         Initial = ""           'Set the third key.
  302.         Do
  303. ' "Read Equal" for matches to the text in "Last Name."
  304.             RE_LName
  305. 'Check to see if matching records have been exhausted.
  306.             If eof_players Then Exit Do
  307. 'A matching record was found so add it to the List Box.
  308.             list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
  309.         Loop
  310.      End If
  311. End Sub
  312.